<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>AdminLTE 2 | Log in</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <!-- Bootstrap 3.3.7 -->
    <link rel="stylesheet" th:href="@{/plugins/bootstrap/css/bootstrap.min.css}">
    <!-- Font Awesome -->
    <link rel="stylesheet" th:href="@{/plugins/font-awesome/css/font-awesome.min.css}">
    <!-- Ionicons -->
    <link rel="stylesheet" th:href="@{/plugins/ionicons/css/ionicons.min.css}">
    <!-- Theme style -->
    <link rel="stylesheet" th:href="@{/plugins/admin-lte/css/AdminLTE.min.css}">
    <!-- iCheck -->
    <link rel="stylesheet" th:href="@{/plugins/iCheck/square/blue.css}">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script th:src="@{/plugins/html5shiv/html5shiv.min.js}"></script>
    <script th:src="@{/plugins/respond/respond.min.js}"></script>
    <![endif]-->

    <!-- Google Font -->
    <link rel="stylesheet"
          href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
</head>
<body class="hold-transition login-page">
<div class="login-box">
    <div class="login-logo">
        <a href="index2.html"><b>Admin</b>LTE</a>
    </div>
    <!-- /.login-logo -->
    <div class="login-box-body">
        <p class="login-box-msg">Sign in to start your session</p>

        <!--    <div th:if="${error}">-->
        <!--      <div class="callout callout-danger">-->
        <!--        <p th:text="${error}">用户名和密码不能为空！</p>-->
        <!--      </div>-->
        <!--    </div>-->

        <form th:action="@{/login}" class="login-form" method="post">
            <div th:if="${not #strings.isEmpty(msg)}" class="form-group">
                <div class="alert alert-danger" th:text="${msg}"></div>
            </div>
            <div class="form-group has-feedback">
                <input type="text" id="username" name="username" class="form-control" placeholder="请输入账号">
                <span class="fa fa-user form-control-feedback" required="true"></span>
            </div>
            <div class="form-group has-feedback">
                <input type="password" id="password" name="password" class="form-control" placeholder="请输入密码">
                <span class="fa fa-lock form-control-feedback" required="true"></span>
            </div>
            <div class="row">
                <div class="col-6">
                    <input type="text" class="form-control" name="captchaCode" placeholder="请输入验证码" required="true">
                </div>
                <div class="col-6">
                    <img alt="单击图片刷新！" class="pointer" th:src="@{/captcha.jpg}"
                         onclick="this.src='/captcha.jpg?d='+new Date()*1">
                </div>
            </div>
            <div class="row">
                <div class="col-xs-8">
                    <div class="checkbox icheck">
                        <label>
                            <input id="rememberMe" name="rememberMe" type="checkbox"> Remember Me
                        </label>
                    </div>
                </div>
                <div class="col-xs-4">
                    <button type="submit" class="btn btn-primary btn-block btn-flat">登录</button>
                </div>
            </div>
        </form>
    </div>
    <!-- /.login-box-body -->
</div>
<!-- /.login-box -->

<!-- jQuery 3 -->
<script th:src="@{/plugins/jquery/jquery.min.js}"></script>
<!-- Bootstrap 3.3.7 -->
<script th:src="@{/plugins/bootstrap/js/bootstrap.min.js}"></script>
<!-- iCheck -->
<script th:src="@{/plugins/iCheck/icheck.min.js}"></script>
<script th:src="@{/plugins/jquery-validation/form-validate-config.js}"></script>
<script>
    $(function () {
        $('input').iCheck({
            checkboxClass: 'icheckbox_square-blue',
            radioClass: 'iradio_square-blue',
            increaseArea: '20%' // optional
        });
    });

</script>
</body>
</html>
